//
//  ZWCitySSTableViewCell.m
//  WanEr
//
//  Created by 高文萍 on 16/1/20.
//  Copyright © 2016年 ziwokeji. All rights reserved.
//

#import "ZWCitySSTableViewCell.h"

@implementation ZWCitySSTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.cityNamLabel = [[UILabel alloc]init];
        self.cityNamLabel.font = [UIFont systemFontOfSize:16];
        [self.contentView addSubview:self.cityNamLabel];
        
        self.byLabel = [[UILabel alloc]init];
        self.byLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:self.byLabel];
        
        self.downLoadBut = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:self.downLoadBut];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.cityNamLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(15));
        make.top.equalTo(@(10));
        make.height.equalTo(@(20));
        make.right.equalTo(@(-10));
    }];
    [self.byLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(15));
        make.top.equalTo(self.cityNamLabel.mas_bottom).offset(0);
        make.height.equalTo(@(20));
    }];
    [self.downLoadBut mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.right.equalTo(self).offset(-15);
        make.width.equalTo(@(20));
        make.height.equalTo(@(17));
    }];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
